package com.by.controller;

import com.by.bean.WareHouseBean;
import com.by.common.bean.ResultBean;
import com.by.common.controller.BaseController;
import com.by.service.WareHouseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:
 * @date: 2025/2/18
 * @version: 1.01
 * @since: jdk11
 */
@RestController
@RequestMapping("/api")
@Api(tags = "仓库管理")
public class WareHouseController extends BaseController {

    @Autowired
    WareHouseService wareHouseService;

    @PostMapping("/ware")
    @ApiOperation("保存仓库表")
    public ResultBean save(WareHouseBean wareHouseBean){
        int rs = wareHouseService.save(wareHouseBean);
        return saveResult(rs);
    }
    @PutMapping("/change")
    @ApiOperation("修改仓库表")
    public ResultBean update(WareHouseBean wareHouseBean){
        int rs = wareHouseService.update(wareHouseBean);
        return updateResult(rs);
    }
}
